import request from '@/utils/request'

//获取订单列表
export function getOrderList(query) {
    return request({
        url: '/orders',
        method: 'get',
        params: query
    })
}


//获取订单详情
export function getOrderDetail(id) {
    return request({
        url: `/order/detail/${id}`,
        method: 'get',
    })
}

//录入采买信息
export function writeBuyInfo(data) {
    return request({
        url: `/trip/history2`,
        method: 'post',
        data
    })
}

//录入物流信息
export function writeLogisticsInfo(data) {
    return request({
        url: `/order/logistics`,
        method: 'post',
        data
    })
}

//查看物流信息
export function getLogisticsInfo(id) {
    return request({
        url: `/order/logistics/${id}`,
        method: 'get'
    })
}

//查看采购信息
export function getTripInfo(id) {
    return request({
        url: `/trip/history2/${id}`,
        method: 'get'
    })
}

//发货
export function sendProduct(data) {
    return request({
        url: `/order/delivery`,
        method: 'put',
        data,
    })
}

